
dAmnSock = {

/*  Private:
            Sends a null byte (\x00) terminated packet to the server. This is a
primitive method that should not generally need to be utilized. The majority of
the methods that are provided by the dAmnSock interface are wrappers for this
method.
*/
    sendPacket: function(data){

    },
/*  Public:
            Checks the socket for data by performing a socket select with the
specified timeout. Returns the oldest packet from the socket buffer if
there is data waiting, else it returns false when the select times out.
An implementation specific identifier will be returned if there is a
socket error.

*/
    getPacket: function(){

    },

/*  Public:
            Connects to the dAmn server and sends the handshake packet
outlined in the dAmn Protocol Specification. Will return false if the
socket cannot be connected to the dAmn server.
*/
    connect: function(){

    },
/* Public:
            Sends a disconnect packet to the dAmn server for clean disconnects.
*/
    disconnect: function(){

    },

/*  Public:
            Sends the packet string that is passed into it directly to the
sendPacket() method, effectively performing a raw packet write. Malformed
packets will cause the server to disconnect the client.
*/
    raw: function(data){

    },

/*  Public:
            Sends a login packet with the user’s authtoken. The key parameter can
be either an authtoken or the users password. It is up to the login method
to either perform the HTTP request to the deviantART login server to
get the authtoken, or to delegate the task to another method before
attempting to connect to the server.
A false value is only returned if nothing is written to the socket, the
result of this method does not reflect the success or failure of the login
attempt. You must wait for a response from the dAmn server for that.
The regular expression /^[0-9a-f]{32}$/i may be used to determine if
the key provided is a authtoken or a password. While this isn’t fool
proof its highly unlikely that a user will have a 32 character hash for a
password.
*/
    login: function(username, key){

    },

/*  Public:
            Sends a ping response to the server so that the client doesn’t timeout.
Read the dAmn Protocol Specification for details on how pong packets
can be utilized.
*/
    pong: function(){

    },

/*  Public:
            Sends a join packet to attempt to join the specified namespace. See
the dAmn Protocol Specification for details on how the server will
respond in different situations.
*/
    join: function(namespace){

    },
/*  Public:
            Sends a part packet to attempt to part the specified namespace. See
the dAmn Protocol Specification for details on how the server will
respond in different situations.
*/
    part: function(namespace){

    },

/*  Public:
            Sends a null byte (\x00) terminated packet to the server. This is a
            primitive method that should not generally need to be utilized. The
            majority of the methods that ar
    */
    whois: function(username){

    },

/* Public:
            Sends a message to the namespace provided. The dAmn server
supports unicode, though not all clients will.
*/
    msg: function(namespace, msg){

    },
/*  Public:
            Sends a non-parsed message to the namespace provided. Non-parsed
messages do not have HTML, thumbs or other data that is generally
pared by the dAmn server converted, so the raw message is delivered to
the clients. The dAmn server supports unicode, though not all clients
will.
*/
    npmsg: function(namespace, msg){

    },
/* Public:
            Sends an action to the namespace provided. An action is the
equivalent of the /me command in the offical dAmn client. The dAmn
server supports unicode, though not all clients will.
*/
    action: function(namespace, msg){

    },

/* Public:

*/
    kill: function(){},
/* Public:
            Sends a kick packet to the specified namespace to attempt to kick the
specified user. A reason for the kick is optional. The dAmn server
supports unicode, though not all clients will.
*/
    kick: function(namespace, username, reason){

    },
/* Public:
            Sends a ban packet to the specified namespace to attempt to ban the
specified user. This is technically the same as demoting the user to the
privclass with at order 1.
*/
    ban: function(namespace, username){

    },

/* Public:
            Sends a promote packet to the specified namespace. A specific
privclass to promote to is optional. The privclass can either be a name or
the order of the privclass. If none is specified the user is promoted one
privclass up the list.
*/
    promote: function(namespace, username, privclass){

    },
/* Public:
            Sends a demote packet to the specified namespace. A specific
privclass to demote to is optional. The privclass can either be a name or
the order of the privclass. If none is specified the user is demoted one
privclass up the list. A ban is possible by demoting to the Banned
privclass. (Assuming that is the name used for order 1)
*/
    demote: function(namespace, username, privclass){

    },

/* Public:
            Sends a packet to the specified namespace to set a property to a
specified value. Acceptable values at the time of this draft include
“topic” and “title”. See the dAmn Protocol Specification for more
information about channel properties.
*/
    setProperty: function(namespace, property, value){

    },
/* Public:
            Sends a packet to the specified namespace to get a named property.
Examples of properties that can be retrieved are listed under section 5 of
the dAmn Protocol Specification. Some properties may be read-only.
*/
    getProperty: function(namespace, property){

    },

/* Public:
            This mediates and sends all admin commands.
*/
    admin: function(){}
}
